package qq.message;

import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;

@javax.annotation.Generated("by gRPC proto compiler")
public class ControllerGrpc {

  private ControllerGrpc() {}

  public static final String SERVICE_NAME = "qq.message.Controller";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<qq.message.Qqmessage.ControllerPrivateMsg,
      qq.message.Qqmessage.Gvoid> METHOD_PRIVATE_MSG =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "qq.message.Controller", "privateMsg"),
          io.grpc.protobuf.ProtoUtils.marshaller(qq.message.Qqmessage.ControllerPrivateMsg.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(qq.message.Qqmessage.Gvoid.getDefaultInstance()));
  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<qq.message.Qqmessage.ControllerGroupMsg,
      qq.message.Qqmessage.Gvoid> METHOD_GROUP_MSG =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "qq.message.Controller", "groupMsg"),
          io.grpc.protobuf.ProtoUtils.marshaller(qq.message.Qqmessage.ControllerGroupMsg.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(qq.message.Qqmessage.Gvoid.getDefaultInstance()));
  @io.grpc.ExperimentalApi
  public static final io.grpc.MethodDescriptor<qq.message.Qqmessage.ControllerDiscussMsg,
      qq.message.Qqmessage.Gvoid> METHOD_DISCUSS_MSG =
      io.grpc.MethodDescriptor.create(
          io.grpc.MethodDescriptor.MethodType.UNARY,
          generateFullMethodName(
              "qq.message.Controller", "discussMsg"),
          io.grpc.protobuf.ProtoUtils.marshaller(qq.message.Qqmessage.ControllerDiscussMsg.getDefaultInstance()),
          io.grpc.protobuf.ProtoUtils.marshaller(qq.message.Qqmessage.Gvoid.getDefaultInstance()));

  public static ControllerStub newStub(io.grpc.Channel channel) {
    return new ControllerStub(channel);
  }

  public static ControllerBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    return new ControllerBlockingStub(channel);
  }

  public static ControllerFutureStub newFutureStub(
      io.grpc.Channel channel) {
    return new ControllerFutureStub(channel);
  }

  public static interface Controller {

    public void privateMsg(qq.message.Qqmessage.ControllerPrivateMsg request,
        io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver);

    public void groupMsg(qq.message.Qqmessage.ControllerGroupMsg request,
        io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver);

    public void discussMsg(qq.message.Qqmessage.ControllerDiscussMsg request,
        io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver);
  }

  public static interface ControllerBlockingClient {

    public qq.message.Qqmessage.Gvoid privateMsg(qq.message.Qqmessage.ControllerPrivateMsg request);

    public qq.message.Qqmessage.Gvoid groupMsg(qq.message.Qqmessage.ControllerGroupMsg request);

    public qq.message.Qqmessage.Gvoid discussMsg(qq.message.Qqmessage.ControllerDiscussMsg request);
  }

  public static interface ControllerFutureClient {

    public com.google.common.util.concurrent.ListenableFuture<qq.message.Qqmessage.Gvoid> privateMsg(
        qq.message.Qqmessage.ControllerPrivateMsg request);

    public com.google.common.util.concurrent.ListenableFuture<qq.message.Qqmessage.Gvoid> groupMsg(
        qq.message.Qqmessage.ControllerGroupMsg request);

    public com.google.common.util.concurrent.ListenableFuture<qq.message.Qqmessage.Gvoid> discussMsg(
        qq.message.Qqmessage.ControllerDiscussMsg request);
  }

  public static class ControllerStub extends io.grpc.stub.AbstractStub<ControllerStub>
      implements Controller {
    private ControllerStub(io.grpc.Channel channel) {
      super(channel);
    }

    private ControllerStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected ControllerStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new ControllerStub(channel, callOptions);
    }

    @java.lang.Override
    public void privateMsg(qq.message.Qqmessage.ControllerPrivateMsg request,
        io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_PRIVATE_MSG, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void groupMsg(qq.message.Qqmessage.ControllerGroupMsg request,
        io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_GROUP_MSG, getCallOptions()), request, responseObserver);
    }

    @java.lang.Override
    public void discussMsg(qq.message.Qqmessage.ControllerDiscussMsg request,
        io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_DISCUSS_MSG, getCallOptions()), request, responseObserver);
    }
  }

  public static class ControllerBlockingStub extends io.grpc.stub.AbstractStub<ControllerBlockingStub>
      implements ControllerBlockingClient {
    private ControllerBlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

    private ControllerBlockingStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected ControllerBlockingStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new ControllerBlockingStub(channel, callOptions);
    }

    @java.lang.Override
    public qq.message.Qqmessage.Gvoid privateMsg(qq.message.Qqmessage.ControllerPrivateMsg request) {
      return blockingUnaryCall(
          getChannel().newCall(METHOD_PRIVATE_MSG, getCallOptions()), request);
    }

    @java.lang.Override
    public qq.message.Qqmessage.Gvoid groupMsg(qq.message.Qqmessage.ControllerGroupMsg request) {
      return blockingUnaryCall(
          getChannel().newCall(METHOD_GROUP_MSG, getCallOptions()), request);
    }

    @java.lang.Override
    public qq.message.Qqmessage.Gvoid discussMsg(qq.message.Qqmessage.ControllerDiscussMsg request) {
      return blockingUnaryCall(
          getChannel().newCall(METHOD_DISCUSS_MSG, getCallOptions()), request);
    }
  }

  public static class ControllerFutureStub extends io.grpc.stub.AbstractStub<ControllerFutureStub>
      implements ControllerFutureClient {
    private ControllerFutureStub(io.grpc.Channel channel) {
      super(channel);
    }

    private ControllerFutureStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected ControllerFutureStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new ControllerFutureStub(channel, callOptions);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<qq.message.Qqmessage.Gvoid> privateMsg(
        qq.message.Qqmessage.ControllerPrivateMsg request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_PRIVATE_MSG, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<qq.message.Qqmessage.Gvoid> groupMsg(
        qq.message.Qqmessage.ControllerGroupMsg request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_GROUP_MSG, getCallOptions()), request);
    }

    @java.lang.Override
    public com.google.common.util.concurrent.ListenableFuture<qq.message.Qqmessage.Gvoid> discussMsg(
        qq.message.Qqmessage.ControllerDiscussMsg request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_DISCUSS_MSG, getCallOptions()), request);
    }
  }

  public static io.grpc.ServerServiceDefinition bindService(
      final Controller serviceImpl) {
    return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME)
      .addMethod(
        METHOD_PRIVATE_MSG,
        asyncUnaryCall(
          new io.grpc.stub.ServerCalls.UnaryMethod<
              qq.message.Qqmessage.ControllerPrivateMsg,
              qq.message.Qqmessage.Gvoid>() {
            @java.lang.Override
            public void invoke(
                qq.message.Qqmessage.ControllerPrivateMsg request,
                io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver) {
              serviceImpl.privateMsg(request, responseObserver);
            }
          }))
      .addMethod(
        METHOD_GROUP_MSG,
        asyncUnaryCall(
          new io.grpc.stub.ServerCalls.UnaryMethod<
              qq.message.Qqmessage.ControllerGroupMsg,
              qq.message.Qqmessage.Gvoid>() {
            @java.lang.Override
            public void invoke(
                qq.message.Qqmessage.ControllerGroupMsg request,
                io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver) {
              serviceImpl.groupMsg(request, responseObserver);
            }
          }))
      .addMethod(
        METHOD_DISCUSS_MSG,
        asyncUnaryCall(
          new io.grpc.stub.ServerCalls.UnaryMethod<
              qq.message.Qqmessage.ControllerDiscussMsg,
              qq.message.Qqmessage.Gvoid>() {
            @java.lang.Override
            public void invoke(
                qq.message.Qqmessage.ControllerDiscussMsg request,
                io.grpc.stub.StreamObserver<qq.message.Qqmessage.Gvoid> responseObserver) {
              serviceImpl.discussMsg(request, responseObserver);
            }
          })).build();
  }
}
